import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/zixun',
    name: 'zixun',
    component: ()=>import('../views/zixun.vue'),
    children:[
      {
        path: '/zuopin',
        name: 'zuopin',
        component: ()=>import('../views/ZX/zuopin.vue')
      },
      {
        path: '/baike',
        name: 'baike',
        component: ()=>import('../views/ZX/baike.vue')
      },
      {
        path: '/huodong',
        name: 'huodong',
        component: ()=>import('../views/ZX/huodong.vue')
      },
      {
        path: '/shipin',
        name: 'shipin',
        component: ()=>import('../views/ZX/shipin.vue')
      },
      {
        path: '/zhibo',
        name: 'zhibo',
        component: ()=>import('../views/ZX/zhibo.vue')
      },
      {
        path: '/zhuanlan',
        name: 'zhuanlan',
        component: ()=>import('../views/ZX/zhuanlan.vue')
      },
      {
        path: '/tuijian',
        name: 'tuijian',
        component: ()=>import('../views/ZX/tuijian.vue')
      },
    ]
  },
  {
    path: '/dongtai',
    name: 'dongtai',
    component: ()=>import('../views/dongtai.vue')
  },
  {
    path: '/liaotian',
    name: 'liaotian',
    component: ()=>import('../views/liaotian.vue')
  },
  {
    path: '/wode',
    name: 'wode',
    component: ()=>import('../views/wode.vue')
  },
  {
    path: '/shezhi',
    name: 'shezhi',
    component: ()=>import('../views/cebianlan/shezhi.vue')
  },
  {
    path: '*',
    name: '404',
    component: ()=>import('../views/404.vue')
  },
  {
    path: '/',
    redirect: 'tuijian'
  },
  
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
